home *** CD-ROM | disk | FTP | other *** search
- // cursor.h RHS 2/15/92
-
- #if !defined(CURSOR_H)
- #define CURSOR_H
-
- #include<windows.h>
-
-
- enum { ARROW, WAIT };
-
- class Cursor
- {
- HCURSOR hArrow;
- HCURSOR hWait;
-
- public:
- Cursor(void)
- {
- hArrow = hWait = 0;
- }
- void operator()(WORD);
- };
-
- void Cursor::operator()(WORD w)
- {
-
- switch(w)
- {
- case ARROW:
- {
- if(!hArrow)
- hArrow = LoadCursor(NULL, IDC_ARROW);
- SetCursor(hArrow);
- break;
- case WAIT:
- if(!hWait)
- hWait = LoadCursor(NULL, IDC_WAIT);
- SetCursor(hWait);
- }
- }
- }
-
- #endif
-
-